package com.farm.test;

import com.farm.wcp.client.WcpClient;

/**通过接口缓存文本并通过该文本打开创建知识页面
 * @author Wd
 *
 */
public class WpClientTestByCreatPirvateText {

	public static void main(String[] args) {
		//免费版-安装版
//		WcpClient client = new WcpClient("http://127.0.0.1:8989/api", "F59BD65F7EDAFB087A81D4DCA06C4910", "apiUser",
//				"111111");
//		client.setGuestUrl("http://127.0.0.1:8989/");
		
		
		
		
		WcpClient client = new WcpClient("http://127.0.0.1:8080/wcp/api", "F59BD65F7EDAFB087A81D4DCA06C4910", "apiUser",
				"111111");
		client.setGuestUrl("http://127.0.0.1:8080/wcp/");
		client.isLive(true);
		String url=client.getCreatPrivateTextUrl("<p><img src=\"http://124.220.7.120:6766/download/Pubfile.do?id=8a80848c8d5da7cd018d7715020e0027&secret=cb09d82f778a4a79afb923841f72801a\" title=\"粘贴图片\" alt=\"粘贴图片\" /> </p><p><br /></p><p><span style=\"color:#E53333;\"><strong>如下图，只做了字符串对比，如何构成安全威胁？</strong></span> </p><p><span style=\"color:#E53333;\"><strong><br /></strong></span> </p><p><img src=\"http://124.220.7.120:6766/download/Pubfile.do?id=8a80848c8d5da7cd018d7715d2a2002a&secret=2f6b08ca84d041e0a8ad6bd1d09c67e7\" title=\"粘贴图片\" alt=\"粘贴图片\" /> </p>","sysadmin");
		System.out.println(url);
	}

}
